package com.yishu.shop.service;

import com.ys.commons.model.JsonResponse;
import com.ys.commons.model.dto.UserDto;
import org.springframework.stereotype.Component;

/**
 * todo
 *
 * @author zengchao
 * @date 2021-07-14 21:26:37
 */
@Component
public class UserServiceFallback implements UserService{

    @Override
    public JsonResponse<UserDto> getUser(Integer id) {
        UserDto userDto = new UserDto();
        userDto.setId(id);
        userDto.setUserName("服务降级调用返回");
        return JsonResponse.ok(userDto);
    }
}
